package com.yj.question_project.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
* Created by Mybatis Generator on 2024/01/11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StationEdge implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 起始左站点
     */
    private Integer sourceStaId;

    private String sourceStaName;

    /**
     * 目标站点
     */
    private Integer targetStaId;

    private String targetStaName;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 删除标记 0 未删除 1 已删除
     */
    private Integer isDel;

    /**
     * qp_station_edge
     */
    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sourceStaId=").append(sourceStaId);
        sb.append(", targetStaId=").append(targetStaId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDel=").append(isDel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StationEdge other = (StationEdge) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSourceStaId() == null ? other.getSourceStaId() == null : this.getSourceStaId().equals(other.getSourceStaId()))
            && (this.getTargetStaId() == null ? other.getTargetStaId() == null : this.getTargetStaId().equals(other.getTargetStaId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSourceStaId() == null) ? 0 : getSourceStaId().hashCode());
        result = prime * result + ((getTargetStaId() == null) ? 0 : getTargetStaId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode());
        return result;
    }
}